package com.xcity.pomelo.response;

import com.xcity.game.buildv2.BuildV2;
import com.xcity.game.item.ItemTemplate;
import com.xcity.pomelo.response.BuildTakeExpResponse.ExpDelta;
import com.xcity.pomelo.response.BuildV2Response.ExpBookTempInfo;
import com.xcity.pomelo.response.BuildV2Response.ExpExtendInfo;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.RESPONSE)
public class EmployeeFreeAllResponse extends Response {
	private int buildId;
	private int ret;
	private ExpDelta expDelta;
	public ExpBookTempInfo expBookInfo;//经验书相关简化信息
	public ExpExtendInfo expExtendInfo;
	public int lastTakeMoney;//上一次领过的钱
	public int takeMoneyElapseSec;//距离上一次开始产钱多少秒
	public EmployeeFreeAllResponse(int serial, BuildV2 build, int ret, ExpDelta expdelta) {
		super(serial);
		this.ret = ret;
		this.expDelta = expdelta;
		ItemTemplate itemTemplate = build.tryGetExpBookTemplate();
		if(itemTemplate != null){
			this.expBookInfo = new ExpBookTempInfo(itemTemplate);
		}
		this.expExtendInfo = new ExpExtendInfo(build);
		this.lastTakeMoney = build.printAndResetLastTakeMoney();
		this.takeMoneyElapseSec = build.calcTakeMoneyElapseSecond();
	}
	public int getBuildId() {
		return buildId;
	}
	public void setBuildId(int buildId) {
		this.buildId = buildId;
	}
	public int getRet() {
		return ret;
	}
	public void setRet(int ret) {
		this.ret = ret;
	}
	public ExpDelta getExpDelta() {
		return expDelta;
	}
	public void setExpDelta(ExpDelta expDelta) {
		this.expDelta = expDelta;
	}
	public ExpBookTempInfo getExpBookInfo() {
		return expBookInfo;
	}
	public void setExpBookInfo(ExpBookTempInfo expBookInfo) {
		this.expBookInfo = expBookInfo;
	}
	public ExpExtendInfo getExpExtendInfo() {
		return expExtendInfo;
	}
	public void setExpExtendInfo(ExpExtendInfo expExtendInfo) {
		this.expExtendInfo = expExtendInfo;
	}
	public int getLastTakeMoney() {
		return lastTakeMoney;
	}
	public void setLastTakeMoney(int lastTakeMoney) {
		this.lastTakeMoney = lastTakeMoney;
	}
	public int getTakeMoneyElapseSec() {
		return takeMoneyElapseSec;
	}
	public void setTakeMoneyElapseSec(int takeMoneyElapseSec) {
		this.takeMoneyElapseSec = takeMoneyElapseSec;
	}
}
